import React from 'react'
import { useHistory } from 'react-router-dom'
import {
  Flex,
  Text,
  Link
} from '@chakra-ui/core'

export default function Home () {
  const history = useHistory()
  const handleClick = () => {
    history.push('/form')
  }

  return (
    <Flex direction="column" align="center">
      <Text as="h2" fontSize="28px" mb={3}>恭喜你，登录成功了也！</Text>
      <Link fontSize="sm" color="#3194d0" _hover={{ textDecoration: 'none' }} onClick={handleClick}>再注册一个账号吧</Link>
    </Flex>
  )
}
